﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ParserTree
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
             Scanner.Scanner s = new Scanner.Scanner();
            s.program = this.richTextBox1.Text;
            s.Scan();
            Parser newpa = new Parser();
            TreeNode Node = newpa.parse(s);
            this.treeView1.Nodes.Clear();
            this.treeView1.Nodes.Add(Node.tNode);
            this.treeView1.ExpandAll();
            
        }
    }
}
